<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.context.support.ClassPathXmlApplicationContext" %>
<%@ page import="com.sample.service.JmsSender" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
  <head><title>Hello :: Spring Application</title></head>
  <body>
    <h1>Hello - Spring Application</h1>
  <%
     String[] xml = {"classpath:applicationContext.xml"};
     ApplicationContext context = new ClassPathXmlApplicationContext(xml);
     JmsSender sender = (JmsSender) context.getBean("jmsSender");
     sender.publish();
  %>
  </body>
</html>